<?php

namespace App\Http\Controllers\Api;


use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class AuthController extends BaseController
{
    public function userinfo(Request $request){
        $user = Auth::user();
        $userinfo = array_merge(
            $user->only('uid', 'gid', 'username', 'mobile', 'email', 'avatar'),
            $user->info->only(['gender', 'province', 'city', 'district'])
        );
        return ajaxReturn(['userinfo' => $userinfo]);
    }
}
